<div class="main">
    <div class="jumbotron">
        <h1>Bienvenue sur Game's com !</h1>
        <p></p>
    </div>
    <br />

    <h1>Top 5 des meilleurs articles</h1>
    <?php
    if (isset($res_last)) {
        while ($row_artsList = mysqli_fetch_array($res_last)) { ?>
        <div class="list-article clearfix">
			<?php if(isset($row_artsList['link']) && $row_artsList['imgStatus'] != 3) { ?>
					<img src="<?= imgLink($row_artsList['link']) ?>" />
			<?php } else { ?>
					<img src="<?= imgLink("img/blockedImg.png") ?>" />
			<?php }?>
            <div>
                <div class="clearfix">
                    <h2 class="pull-left"><a href="<?= WEBROOT ?>article/article.php?id=<?= $row_artsList['id'] ?>" title="<?= $row_artsList['title'] ?>"><?php if(isset($row_artsList['title'])) { echo $row_artsList['title']; } ?></a></h2>
                    <?php if(isset($row_artsList['note'])) {
                        if($row_artsList['note'] < 0) { ?>
                    <div class="note note-red pull-right">&#8722; <?= abs($row_artsList['note']); ?></div>
                    <?php } elseif ($row_artsList['note'] == 0) { ?>
                    <div class="note note-grey pull-right"><?= $row_artsList['note']; ?></div>
                    <?php } else { ?>
                    <div class="note note-green pull-right">+ <?= $row_artsList['note']; ?></div>
                    <?php }
                    } ?>
                </div>
                <div>
                    <a href="<?= WEBROOT ?>user/user.php?id=<?= $row_artsList['autorID'] ?>"><?php if(isset($row_artsList['autor'])) { echo $row_artsList['autor']; } ?></a>
                    <span>&emsp;&mdash;&emsp;</span>
                    <?php if(isset($row_artsList['date'])) {  echo strftime("le %d %B %Y à %H:%M:%S",strtotime($row_artsList['date'])); } ?>
                    <span>&emsp;&mdash;&emsp;</span>
                    <?php if(isset($row_artsList['type'])) { echo $row_artsList['type']; } ?>
                </div>
                <p><?php if(isset($row_artsList['content'])) { echo substr($row_artsList['content'], 0, 200)."..."; } ?></p>

            </div>

        </div>

        <?php }
     } ?>
</div>
